import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class Test1 {
    //旧键盘上坏了几个键，于是在敲一段文字的时候，对应的字符就不会出现。现在给出应该输入的一段文字、以及实际被输入的文字，请你列出
    //肯定坏掉的那些键
    public static void badKey(String s1,String s2){
        StringBuilder stringBuilder = new StringBuilder();
        Set<Character> set = new HashSet<>();
        Set<Character> set1 = new TreeSet<>();
        for (char ch:s2.toUpperCase().toCharArray()) {
            set.add(ch);
        }
        for (char ch:s1.toUpperCase().toCharArray()) {
            if (!set.contains(ch) && !set1.contains(ch)){
                System.out.print(ch);
                set1.add(ch);
            }
        }
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()){
            String str1 = in.nextLine();
            String str2 = in.nextLine();
            badKey(str1,str2);
        }
    }
}
